package com.etc.dao;

import com.etc.entity.Area;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 林铭淞
 * 省市dao
 */
@Repository
@Mapper
public interface AreaMapper {
    @Cacheable(cacheNames = "dao.AreaMapper.selectAreaByPage")
    List<Area> selectAreaByPage(int page, int pageSize, String content);

    @Cacheable(cacheNames = "dao.AreaMapper.selectCount")
    int selectCount(String content);

    @Cacheable(cacheNames = "dao.AreaMapper.selectProvince")
    List<Area> selectProvince();

    @Cacheable(cacheNames = "dao.AreaMapper.selectCity")
    List<Area> selectCity(Integer provinceId);
}